#pragma once

#include <Blobz.h>
#include <BlobzGui.h>
#include <BlobzUtility.h>
#include "Audio/Audio.h"
#include <Graphics/ParticleSystem/ParticleEmitter.h>
#include "Graphics/gui/GUIListener.h"
#include "TouchListener/TouchData.h"

namespace Tutorial3
{
	class TutorApp3 : public Blobz::BaseApplication, Blobz::GUIListener
	{
	public:
		TutorApp3();
		~TutorApp3();

	public:
		virtual bool onInitialize();
		virtual void onDeinitialize();

		virtual void onReload();

		virtual void onUpdate(float inFrameTime);
		virtual void onDraw();

		virtual void onFingerDown(const TouchListener::TouchData& inData);
		virtual void onFingerUp(const TouchListener::TouchData& inData);
		virtual void onFingerUpdate(const TouchListener::TouchData& inData);
		virtual void onFingerExit(const TouchListener::TouchData& inData);
		virtual void onGUIEvent(Blobz::GUIBase* inpComponent, Blobz::GUIEvent inGUIEvent, Blobz::FingerEvent inFingerEvent);

	private:
		void renderBackground();

	private:
		Blobz::Texture mBackgroundTexture;
		Blobz::TrueTypeFont mExampleFont;

		Blobz::GUIManager mExampleGUIManager;
		Blobz::Slider *mpExampleSlider;
		Blobz::ParticleEmitter mParticleEmitter;

		Blobz::Audio mExampleSound;
		Blobz::Audio mExampleMusic;
	};
}
